<?php
	session_start();
	
	date_default_timezone_set("PRC");
	
	$servername = "localhost";
	$username = "root";
//	$password = "root";
	/*配置数据库密码跟本地通用*/
	$password = $_SERVER["HTTP_HOST"] == "localhost" ? "root" : "root";
	$dbname = "myshop2";
	
//	/*服务器密码*/
//	if($_SERVER["HTTP_HOST"] != "localhost"){
//		$password = "Zyc870926";
//	}
		
	$conn = mysqli_connect($servername, $username, $password, $dbname);
	
	if(mysqli_connect_errno()) {
		echo "服务器连接失败" . mysqli_connect_error();
	}
?>